Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lukeed/ms

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lukeed/ms

A tiny (414B) and fast utility to convert milliseconds to and from strings.

  • 2.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
905K
decreased by-1.92%
Maintainers
1
Weekly downloads
 
Created

What is @lukeed/ms?

@lukeed/ms is a lightweight utility for converting milliseconds to human-readable strings and vice versa. It is useful for handling time durations in a more readable format.

What are @lukeed/ms's main functionalities?

Convert milliseconds to human-readable string

This feature allows you to convert a duration in milliseconds to a human-readable string format. For example, 1500 milliseconds is converted to '1.5s'.

const ms = require('@lukeed/ms');
console.log(ms(1500)); // '1.5s'

Convert human-readable string to milliseconds

This feature allows you to convert a human-readable string representing a duration back to milliseconds. For example, '1.5s' is converted to 1500 milliseconds.

const ms = require('@lukeed/ms');
console.log(ms('1.5s')); // 1500

Other packages similar to @lukeed/ms

Keywords

FAQs

Package last updated on 28 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc